package cn.gailvlun.gll.widget.edittext

import cn.gailvlun.gll.util.ToastUtil


class InvitationFilter : BaseFilter() {


    private val mRegexPwd: Regex
        get() = "[a-zA-Z\\d]".toRegex()

    override fun isAllowed(c: Char): Boolean {

        return if (mRegexPwd.matches(c.toString())) {
            true
        } else {

            ToastUtil.showShort("邀请码有误，请重新输入")
            false
        }
    }


}